package com.geely.design.pattern.behavioral.state;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class Test {
    public static void main(String[] args) {
        CourseVideoContext context = new CourseVideoContext();
        context.setCourseVideoState(new PlayState());

        log.info("当前状态: {}", context.getCourseVideoState().getClass().getSimpleName());
        context.pause();

        log.info("当前状态: {}", context.getCourseVideoState().getClass().getSimpleName());
        context.speed();

        log.info("当前状态: {}", context.getCourseVideoState().getClass().getSimpleName());
        context.stop();

        log.info("当前状态: {}", context.getCourseVideoState().getClass().getSimpleName());
        context.speed();

        log.info("当前状态: {}", context.getCourseVideoState().getClass().getSimpleName());
        context.pause();

    }
}
